//
//  LYDownLoadTableViewCell.m
//  MusicMV
//
//  Created by dllo on 16/3/31.
//  Copyright © 2016年 Eternity. All rights reserved.
//

#import "LYDownLoadTableViewCell.h"

@interface LYDownLoadTableViewCell ()

@property (nonatomic, retain) UILabel *nameLabel;
@property (nonatomic, retain) UILabel *titleLabel;
@end
@implementation LYDownLoadTableViewCell


- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        
        
        [self createView];
    }
    return self;
}


- (void)createView {
    
    self.nameLabel = [[UILabel alloc] init];
    [self.contentView addSubview:_nameLabel];
    
    self.titleLabel = [[UILabel alloc] init];
    [self.contentView addSubview:_titleLabel];
    
}

- (void)setModel:(LYDayMusicModel *)model {
    
    _model = model;
    
    _nameLabel.text = model.singerName;
    _titleLabel.text = model.name;
    _titleLabel.font = [UIFont systemFontOfSize:15];
    _titleLabel.textColor = [UIColor lightGrayColor];
    
}

- (void)layoutSubviews {
    
    [super layoutSubviews];
    
    
    self.nameLabel.frame = CGRectMake(10 * wt, 5 * ht, self.contentView.frame.size.width, 30 * ht);
    
    self.titleLabel.frame = CGRectMake(10 * wt, _nameLabel.frame.size.height + _nameLabel.frame.origin.y, self.contentView.frame.size.width, 30 * ht);
    
}
- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
